package com.example.team.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 编写者：蓝江富
 * 时间：2023年11月2日19:04:18
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

    //解决  No mapping for GET 访问静态资源
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/**")
                .addResourceLocations("classpath:/static/");
    }
}